import java.io.IOException;
import java.net.SocketException;
import java.util.HashMap;

public class UdpServe22 extends UdpServe2{
    public HashMap<String,String>dict=new HashMap<>();
    public UdpServe22(int port) throws SocketException {
        super(port);
        dict.put("cat","小猫");
        dict.put("dog","小狗");
    }

    @Override
    public String process(String request) {
        return dict.getOrDefault(request,"输入错误");
    }

    public static void main(String[] args) throws IOException {
        UdpServe22 udpServe22=new UdpServe22(10002);
        udpServe22.start();


    }
}
